home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor1
/
transapp.doc
< prev
next >
Wrap
Text File
|
1995-03-31
|
3KB
|
64 lines
Program Development Link Translator
Author: Ted Beers
Date: Mon Mar 04 1991
We (the developers of PDL) considered building into PDL the automatic
conversion of HP 48 "directory-format" files into PDL format, but were
eventually stymied by the free-form manner in which the HP 48 transfers
directory objects. We concluded that, to properly translate from HP 48
directory format, PDL would have to be able to parse HP 48 user language--a
task we avoided for the sake of releasing PDL as soon as possible.
(By the way, PDL is at least benevolent towards the HP 48 ASCII transfer
format; you can open a file transferred from the HP 48 [provided it's not too
large] and PDL will interpret the angle and fraction mark modes and use the
contents of the file as a single unnamed variable.)
Anyway, we also investigated the concept of a format conversion utility that
allowed the user to interactively "parse" his own work and that simplified the
file editing aspect of the task. This utility was abandoned as part of the PDL
package because of resource and scheduling difficulties.
Since PDL is finally finished, however, we've had a chance to take another look
at the format conversion utility. So here it is (in uuencode format and
offered "as is"), along with more information.
Ted Beers
Software R&D Engineer
Hewlett-Packard
The MS-DOS program called TransApp can be used to translate an HP 48
application file on your PC from most ASCII formats to the PDL application file
format.
An HP 48 application not developed in PDL usually has one of these formats:
o HP 48 directory format. Contains one "flat" directory object
representing the complete application.
o Packed format. Contains objects, names, and commands for
creating the application using the HP 48 stack.
For each of these formats, the file may contain a "%%HP" header line defining
HP 48 settings. Here is an example comparing directory format, packed format,
and standard "PDL format":
Directory Format Packed Format PDL Format
%%HP:...; %%HP:...;
DIR 'name-1' ...
name-1 obj-1 /Var name-1
obj-1 SWAP STO obj-1
name-2 'name-2' /Var name-2
obj-2 obj-2 obj-2
... SWAP STO ...
name-n ... /Var name-n
obj-n 'name-n' obj-n
END obj-n
SWAP STO
[Note: the source file MUST NOT end with ^Z (ASCII 26, the CTRL-Z code), or
TRANSAPP will bomb out. If necessary, remove the DOS end-of-file marker
manually with your favorite text editor. -jkh-]